const _ = require('lodash')

const f = _.flowRight(_.toUpper, _.first, _.reverse)

console.log(f(['one', 'two', 'three']))

const _split = _.curry((sep, str) => {
    return _.split(str, sep)
})

const _join = _.curry((sep, arr) => {
    return _.join(arr, sep)
})

// const log=(res)=>{
//     console.log(res)
//     return res
// }
const trace = _.curry((tag, res) => {
    console.log(tag, res)
    return res
})

const _map = _.curry((fn, arr) => {
    return _.map(arr, fn)
})

const testF = _.flowRight(_join('-'), _map(_.toLower), trace("split"), _split(' '))

console.log(testF("NEVER SAY DIE"))
